package com.mew.lobby.message.request;

import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.Data;

/**
 * @author dylin
 * @create 2021/5/11
 */
@Data
public class FriendApplyUpdateRequest extends ZebraBaseMessage<FriendApplyUpdateRequest> {
    private long friendId;//朋友ID
    private int op;//操作 1 同意 2 忽略
    @Override
    public void write(ByteBuf b) {
        writeLong(b,friendId);
        writeInt(b,op);
    }

    @Override
    public FriendApplyUpdateRequest read(ByteBuf byteBuf) {
        FriendApplyUpdateRequest request=new FriendApplyUpdateRequest();
        request.setFriendId(byteBuf.readLong());
        request.setOp(byteBuf.readInt());
        return request;
    }
}
